﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Excel=Microsoft.Office.Interop.Excel;

namespace ExcelReport
{
    public static class ExcelContain
    {     
        public static bool ContainSheet(this Excel.Sheets sheets, string name)
        {
            foreach (Excel.Worksheet sheet in sheets)
            {
                if (sheet.Name == name)
                {
                    return true;
                }
            }
            return false;
        }
    }
}
